﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PRO.ORM;
using System.Data;

namespace PRO.Entity
{
    [Entity(TableName = "Pro_CashCoupon")]
    public class CashCouponInfo : BaseEntity
    {
        private int _ID;
        /// <summary>
        /// 编号
        /// </summary>
        [EntityAttribute(SqlDbType = SqlDbType.Int, Len = 4, PrimaryKey = true)]
        public int ID
        {
            get { return _ID; }
            set { _ID = value; }
        }

        private string _CardNumber;
        /// <summary>
        /// 卡号
        /// </summary>
        [EntityAttribute(SqlDbType = SqlDbType.NVarChar, Len = 12)]
        public string CardNumber
        {
            get { return _CardNumber; }
            set { _CardNumber = value; }
        }
        private decimal _CashPrice;
        /// <summary>
        /// 价值金额
        /// </summary>
        [EntityAttribute(SqlDbType = SqlDbType.Decimal, Len = 6, DefaultValue = 0)]
        public decimal CashPrice
        {
            get { return _CashPrice; }
            set { _CashPrice = value; }
        }

        private int _Status;
        /// <summary>
        /// 礼品卡状态（0：正常待销售；1：已经销售未使用；2：已经使用过了）
        /// </summary>
        [EntityAttribute(SqlDbType = SqlDbType.Int, Len = 4, DefaultValue = 0)]
        public int Status
        {
            get { return _Status; }
            set { _Status = value; }
        }
        private DateTime _CreateTime;
        /// <summary>
        /// 礼品卡创建时间
        /// </summary>
        [EntityAttribute(SqlDbType = SqlDbType.DateTime, Len = 8, DefaultValue = "getdate()")]
        public DateTime CreateTime
        {
            get { return _CreateTime; }
            set { _CreateTime = value; }
        }

        private Nullable<DateTime> _UseTime;
        /// <summary>
        /// 消费时间
        /// </summary>
        [EntityAttribute(SqlDbType = SqlDbType.DateTime, Len = 8, NotNull = false)]
        public Nullable<DateTime> UseTime
        {
            get { return _UseTime; }
            set { _UseTime = value; }
        }
    }
}
